/* 
 * File:   PointIncProbKnockingStrategy.h
 * Author: root
 *
 * Created on December 7, 2008, 3:55 PM
 */

#ifndef _POINTINCPROBKNOCKINGSTRATEGY_H
#define	_POINTINCPROBKNOCKINGSTRATEGY_H

#include "KnockingStrategy.h"

class PointIncProbKnockingStrategy : public KnockingStrategy {
    
    int probabilityThreshold;
    int decisionCertainty;
    
protected:
    
    virtual void setExecutionParameter(int index, int rangeFraction) {
        // The execution parameter is the probability threshold
        probabilityThreshold = rangeFraction;
    }

public:
    
    PointIncProbKnockingStrategy() 
    : KnockingStrategy(string("PointIncProbKnockingStrategy"), 1), probabilityThreshold(0), decisionCertainty(0) {}
    
    PointIncProbKnockingStrategy(int myWeight)
    : KnockingStrategy(myWeight), probabilityThreshold(0), decisionCertainty(0)
    {
    }
                
    virtual int getDecisionCertainty() {
        return decisionCertainty;
    }

    virtual Strategy* getActiveInstance(int inst_weight) {
        return dynamic_cast<Strategy*>(new PointIncProbKnockingStrategy(inst_weight));
    }
    
    virtual void opponentMove(int opponent, const Move& move) {}
    virtual bool decideKnock(CCardStack*, const GameState*);

};

#endif	/* _POINTINCPROBKNOCKINGSTRATEGY_H */

